<div style="margin-left: 20px; margin-top: 20px;">
<div>
  <calendar (onSelected)="onCalendarSelected($event)"></calendar>
</div>

<div style="padding-top: 40px;width: 80%">
  <div><i style="font-size: 16px">我的日报 {{current_date}}</i><div class="export-data" (click)="export()">导出</div></div>
</div>

<div style="padding-top: 40px;">
<table *ngFor="let task of tasks; let i= index" class="context_col">
     <tr>
         <td style="width: 5%;text-align: center;">{{i+1}}</td>
         <td style="width: 20%;">
         <span>{{ task.name}}</span>
         <span> {{task.receiver.name}}</span>
         </td>
         <td></td>
         <td></td>
         <td style="width: 10%;"></td>
     </tr>
     <tr  *ngFor="let daily of task.dailys" >
         <td></td>
         <td style="text-align: left;vertical-align: top;" class="font-style">{{daily.date}}</td>
         <td>
         <textarea disabled="disabled" *ngIf="daily.report" >{{daily.report}}</textarea>
         <img src="assets/images/report.png" *ngIf="!daily.report">
         </td>
         <td>
          <textarea disabled="disabled" *ngIf="daily.next_work" >{{daily.next_work}}</textarea>
         <img src="assets/images/next_work.png" *ngIf="!daily.next_work">
         </td>
         <td style="text-align: center;" ><div class="edit-style" *ngIf="!mine.manager" (click)="createdaily(daily)">编辑日报</div></td>
     </tr>
 </table>
 <div>
</div>

 <div class="mask" *ngIf="dailyShowed">
  <div class="project-opendiv">
    <div class="new-plan">
      <span>添加日报/编辑日报</span>
      <img src="assets/images/x.png" (click)="dailyShowed = !dailyShowed" />
    </div>
    <div class="project-form">
    <table style="border-spacing:10px 10px">
       <tr>
          <td style="width: 30%">日报日期</td>
          <td>{{daily.date}}</td>
      </tr> 
      <tr>
        <td>总结与障碍</td>
        <td><textarea [(ngModel)]="daily.report" ></textarea></td>
      </tr>
      <tr>
        <td>下一步工作安排</td>
         <td><textarea [(ngModel)]="daily.next_work" ></textarea></td>
      </tr>
      </table>

      <div class="submit">
          <i class="save" (click)="save(daily)" ></i>
          <i class="cancel" (click)="dailyShowed = !dailyShowed"></i>
      </div>
     </div>
  </div>
</div>


